package com.lry.basic.mq;

/**
 * @author:刘仁有
 * @desc:
 * @email:953506233@qq.com
 * @data:2019/6/19
 */
public class Handler {
    private Looper looper;
    private MessageQueue mq;
    public Handler(){
        looper = Looper.getLooper();
        mq = looper.queue;
    }
    public void sendMessage(Message msg){
        msg.target = this;
        mq.enqueue(msg);
    }

    public void dispatherMessage(Message msg) {
        handlerMessage(msg);
    }

    /**
     * 处理消息
     * @param msg
     */
    public void handlerMessage(Message msg){

    }
}
